﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Configuration.Provider;
using System.Web.Configuration;
using System.Web;
using BesAsm.ModelData.Entities;
using BesAsm.ModelData.Data;
using BesAsm.ModelData.Data.Bases;

#endregion

namespace BesAsm.ModelData.Data
{
	/// <summary>
	/// This class represents the Data source repository and gives access to all the underlying providers.
	/// </summary>
	[CLSCompliant(true)]
	public sealed class DataRepository 
	{
		private static volatile NetTiersProvider _provider = null;
        private static volatile NetTiersProviderCollection _providers = null;
		private static volatile NetTiersServiceSection _section = null;
        
        private static object SyncRoot = new object();
				
		private DataRepository()
		{
		}
		
		#region Public LoadProvider
		/// <summary>
        /// Enables the DataRepository to programatically create and 
        /// pass in a <c>NetTiersProvider</c> during runtime.
        /// </summary>
        /// <param name="provider">An instatiated NetTiersProvider.</param>
        public static void LoadProvider(NetTiersProvider provider)
        {
			LoadProvider(provider, false);
        }
		
		/// <summary>
        /// Enables the DataRepository to programatically create and 
        /// pass in a <c>NetTiersProvider</c> during runtime.
        /// </summary>
        /// <param name="provider">An instatiated NetTiersProvider.</param>
        /// <param name="setAsDefault">ability to set any valid provider as the default provider for the DataRepository.</param>
		public static void LoadProvider(NetTiersProvider provider, bool setAsDefault)
        {
            if (provider == null)
                throw new ArgumentNullException("provider");

            if (_providers == null)
			{
				lock(SyncRoot)
				{
            		if (_providers == null)
						_providers = new NetTiersProviderCollection();
				}
			}
			
            if (_providers[provider.Name] == null)
            {
                lock (_providers.SyncRoot)
                {
                    _providers.Add(provider);
                }
            }

            if (_provider == null || setAsDefault)
            {
                lock (SyncRoot)
                {
                    if(_provider == null || setAsDefault)
                         _provider = provider;
                }
            }
        }
		#endregion 
		
		///<summary>
		/// Configuration based provider loading, will load the providers on first call.
		///</summary>
		private static void LoadProviders()
        {
            // Avoid claiming lock if providers are already loaded
            if (_provider == null)
            {
                lock (SyncRoot)
                {
                    // Do this again to make sure _provider is still null
                    if (_provider == null)
                    {
                        // Load registered providers and point _provider to the default provider
                        _providers = new NetTiersProviderCollection();

                        ProvidersHelper.InstantiateProviders(NetTiersSection.Providers, _providers, typeof(NetTiersProvider));
						_provider = _providers[NetTiersSection.DefaultProvider];

                        if (_provider == null)
                        {
                            throw new ProviderException("Unable to load default NetTiersProvider");
                        }
                    }
                }
            }
        }

		/// <summary>
        /// Gets the provider.
        /// </summary>
        /// <value>The provider.</value>
        public static NetTiersProvider Provider
        {
            get { LoadProviders(); return _provider; }
        }

		/// <summary>
        /// Gets the provider collection.
        /// </summary>
        /// <value>The providers.</value>
        public static NetTiersProviderCollection Providers
        {
            get { LoadProviders(); return _providers; }
        }
		
		/// <summary>
		/// Creates a new <see cref="TransactionManager"/> instance from the current datasource.
		/// </summary>
		/// <returns></returns>
		public TransactionManager CreateTransaction()
		{
			return _provider.CreateTransaction();
		}

		#region Configuration

		/// <summary>
		/// Gets a reference to the configured NetTiersServiceSection object.
		/// </summary>
		public static NetTiersServiceSection NetTiersSection
		{
			get
			{
				// Try to get a reference to the default <netTiersService> section
				_section = WebConfigurationManager.GetSection("netTiersService") as NetTiersServiceSection;

				if ( _section == null )
				{
					// otherwise look for section based on the assembly name
					_section = WebConfigurationManager.GetSection("BesAsm.ModelData.Data") as NetTiersServiceSection;
				}

				if ( _section == null )
				{
					throw new ProviderException("Unable to load NetTiersServiceSection");
				}

				return _section;
			}
		}

		#endregion Configuration

		#region Connections

		/// <summary>
		/// Gets a reference to the ConnectionStringSettings collection.
		/// </summary>
		public static ConnectionStringSettingsCollection ConnectionStrings
		{
			get
			{
					return WebConfigurationManager.ConnectionStrings;
			}
		}

		// dictionary of connection providers
		private static Dictionary<String, ConnectionProvider> _connections;

		/// <summary>
		/// Gets the dictionary of connection providers.
		/// </summary>
		public static Dictionary<String, ConnectionProvider> Connections
		{
			get
			{
				if ( _connections == null )
				{
					lock (SyncRoot)
                	{
						if (_connections == null)
						{
							_connections = new Dictionary<String, ConnectionProvider>();
		
							// add a connection provider for each configured connection string
							foreach ( ConnectionStringSettings conn in ConnectionStrings )
							{
								_connections.Add(conn.Name, new ConnectionProvider(conn.Name, conn.ConnectionString));
							}
						}
					}
				}

				return _connections;
			}
		}

		/// <summary>
		/// Adds the specified connection string to the map of connection strings.
		/// </summary>
		/// <param name="connectionStringName">The connection string name.</param>
		/// <param name="connectionString">The provider specific connection information.</param>
		public static void AddConnection(String connectionStringName, String connectionString)
		{
			lock (SyncRoot)
            {
				Connections.Remove(connectionStringName);
				ConnectionProvider connection = new ConnectionProvider(connectionStringName, connectionString);
				Connections.Add(connectionStringName, connection);
			}
		}

		/// <summary>
		/// Provides ability to switch connection string at runtime.
		/// </summary>
		public sealed class ConnectionProvider
		{
			private NetTiersProvider _provider;
			private NetTiersProviderCollection _providers;
			private String _connectionStringName;
			private String _connectionString;


			/// <summary>
			/// Initializes a new instance of the ConnectionProvider class.
			/// </summary>
			/// <param name="connectionStringName">The connection string name.</param>
			/// <param name="connectionString">The provider specific connection information.</param>
			public ConnectionProvider(String connectionStringName, String connectionString)
			{
				_connectionString = connectionString;
				_connectionStringName = connectionStringName;
			}

			/// <summary>
			/// Gets the provider.
			/// </summary>
			public NetTiersProvider Provider
			{
				get { LoadProviders(); return _provider; }
			}

			/// <summary>
			/// Gets the provider collection.
			/// </summary>
			public NetTiersProviderCollection Providers
			{
				get { LoadProviders(); return _providers; }
			}

			/// <summary>
			/// Instantiates the configured providers based on the supplied connection string.
			/// </summary>
			private void LoadProviders()
			{
				DataRepository.LoadProviders();

				// Avoid claiming lock if providers are already loaded
				if ( _providers == null )
				{
					lock ( SyncRoot )
					{
						// Do this again to make sure _provider is still null
						if ( _providers == null )
						{
							// apply connection information to each provider
							for ( int i = 0; i < NetTiersSection.Providers.Count; i++ )
							{
								NetTiersSection.Providers[i].Parameters["connectionStringName"] = _connectionStringName;
								// remove previous connection string, if any
								NetTiersSection.Providers[i].Parameters.Remove("connectionString");

								if ( !String.IsNullOrEmpty(_connectionString) )
								{
									NetTiersSection.Providers[i].Parameters["connectionString"] = _connectionString;
								}
							}

							// Load registered providers and point _provider to the default provider
							_providers = new NetTiersProviderCollection();

							ProvidersHelper.InstantiateProviders(NetTiersSection.Providers, _providers, typeof(NetTiersProvider));
							_provider = _providers[NetTiersSection.DefaultProvider];
						}
					}
				}
			}
		}

		#endregion Connections

		#region Static properties
		
		#region ModelSscProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelSsc"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelSscProviderBase ModelSscProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelSscProvider;
			}
		}
		
		#endregion
		
		#region ModelIcNodeRedirectorProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelIcNodeRedirector"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelIcNodeRedirectorProviderBase ModelIcNodeRedirectorProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelIcNodeRedirectorProvider;
			}
		}
		
		#endregion
		
		#region ModelParkingTargetProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelParkingTarget"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelParkingTargetProviderBase ModelParkingTargetProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelParkingTargetProvider;
			}
		}
		
		#endregion
		
		#region ModelLinkProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelLink"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelLinkProviderBase ModelLinkProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelLinkProvider;
			}
		}
		
		#endregion
		
		#region ModelSanPatternProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelSanPattern"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelSanPatternProviderBase ModelSanPatternProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelSanPatternProvider;
			}
		}
		
		#endregion
		
		#region ModelDscProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelDsc"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelDscProviderBase ModelDscProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelDscProvider;
			}
		}
		
		#endregion
		
		#region ModelCrossSectionProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelCrossSection"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelCrossSectionProviderBase ModelCrossSectionProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelCrossSectionProvider;
			}
		}
		
		#endregion
		
		#region ModelIcDiscoProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelIcDisco"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelIcDiscoProviderBase ModelIcDiscoProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelIcDiscoProvider;
			}
		}
		
		#endregion
		
		#region ModelNodeProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelNode"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelNodeProviderBase ModelNodeProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelNodeProvider;
			}
		}
		
		#endregion
		
		#region ModelPipeShapeProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelPipeShape"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelPipeShapeProviderBase ModelPipeShapeProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelPipeShapeProvider;
			}
		}
		
		#endregion
		
		#region ModelPumpCurveProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelPumpCurve"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelPumpCurveProviderBase ModelPumpCurveProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelPumpCurveProvider;
			}
		}
		
		#endregion
		
		#region ModelSpecialLinkProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelSpecialLink"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelSpecialLinkProviderBase ModelSpecialLinkProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelSpecialLinkProvider;
			}
		}
		
		#endregion
		
		#region ModelStreetTargetProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelStreetTarget"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelStreetTargetProviderBase ModelStreetTargetProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelStreetTargetProvider;
			}
		}
		
		#endregion
		
		#region ModelSpecialLinksDatumProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelSpecialLinksDatum"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelSpecialLinksDatumProviderBase ModelSpecialLinksDatumProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelSpecialLinksDatumProvider;
			}
		}
		
		#endregion
		
		#region ModelIcDrywellProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelIcDrywell"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelIcDrywellProviderBase ModelIcDrywellProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelIcDrywellProvider;
			}
		}
		
		#endregion
		
		#region ModelPumpProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelPump"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelPumpProviderBase ModelPumpProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelPumpProvider;
			}
		}
		
		#endregion
		
		#region ModelPipeShapesDatumProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelPipeShapesDatum"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelPipeShapesDatumProviderBase ModelPipeShapesDatumProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelPipeShapesDatumProvider;
			}
		}
		
		#endregion
		
		#region ModelRoofTargetProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelRoofTarget"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelRoofTargetProviderBase ModelRoofTargetProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelRoofTargetProvider;
			}
		}
		
		#endregion
		
		#region ModelCrossSectionsDatumProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ModelCrossSectionsDatum"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ModelCrossSectionsDatumProviderBase ModelCrossSectionsDatumProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ModelCrossSectionsDatumProvider;
			}
		}
		
		#endregion
		
		
		#endregion
	}
	
	#region Query/Filters
		
	#region ModelSscFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelSsc"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelSscFilters : ModelSscFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelSscFilters class.
		/// </summary>
		public ModelSscFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelSscFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelSscFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelSscFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelSscFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelSscFilters
	
	#region ModelSscQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelSscParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelSsc"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelSscQuery : ModelSscParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelSscQuery class.
		/// </summary>
		public ModelSscQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelSscQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelSscQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelSscQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelSscQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelSscQuery
		
	#region ModelIcNodeRedirectorFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelIcNodeRedirector"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelIcNodeRedirectorFilters : ModelIcNodeRedirectorFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelIcNodeRedirectorFilters class.
		/// </summary>
		public ModelIcNodeRedirectorFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelIcNodeRedirectorFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelIcNodeRedirectorFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelIcNodeRedirectorFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelIcNodeRedirectorFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelIcNodeRedirectorFilters
	
	#region ModelIcNodeRedirectorQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelIcNodeRedirectorParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelIcNodeRedirector"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelIcNodeRedirectorQuery : ModelIcNodeRedirectorParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelIcNodeRedirectorQuery class.
		/// </summary>
		public ModelIcNodeRedirectorQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelIcNodeRedirectorQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelIcNodeRedirectorQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelIcNodeRedirectorQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelIcNodeRedirectorQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelIcNodeRedirectorQuery
		
	#region ModelParkingTargetFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelParkingTarget"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelParkingTargetFilters : ModelParkingTargetFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelParkingTargetFilters class.
		/// </summary>
		public ModelParkingTargetFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelParkingTargetFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelParkingTargetFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelParkingTargetFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelParkingTargetFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelParkingTargetFilters
	
	#region ModelParkingTargetQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelParkingTargetParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelParkingTarget"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelParkingTargetQuery : ModelParkingTargetParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelParkingTargetQuery class.
		/// </summary>
		public ModelParkingTargetQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelParkingTargetQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelParkingTargetQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelParkingTargetQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelParkingTargetQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelParkingTargetQuery
		
	#region ModelLinkFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelLink"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelLinkFilters : ModelLinkFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelLinkFilters class.
		/// </summary>
		public ModelLinkFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelLinkFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelLinkFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelLinkFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelLinkFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelLinkFilters
	
	#region ModelLinkQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelLinkParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelLink"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelLinkQuery : ModelLinkParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelLinkQuery class.
		/// </summary>
		public ModelLinkQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelLinkQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelLinkQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelLinkQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelLinkQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelLinkQuery
		
	#region ModelSanPatternFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelSanPattern"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelSanPatternFilters : ModelSanPatternFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelSanPatternFilters class.
		/// </summary>
		public ModelSanPatternFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelSanPatternFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelSanPatternFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelSanPatternFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelSanPatternFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelSanPatternFilters
	
	#region ModelSanPatternQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelSanPatternParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelSanPattern"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelSanPatternQuery : ModelSanPatternParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelSanPatternQuery class.
		/// </summary>
		public ModelSanPatternQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelSanPatternQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelSanPatternQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelSanPatternQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelSanPatternQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelSanPatternQuery
		
	#region ModelDscFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelDsc"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelDscFilters : ModelDscFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelDscFilters class.
		/// </summary>
		public ModelDscFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelDscFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelDscFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelDscFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelDscFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelDscFilters
	
	#region ModelDscQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelDscParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelDsc"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelDscQuery : ModelDscParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelDscQuery class.
		/// </summary>
		public ModelDscQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelDscQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelDscQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelDscQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelDscQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelDscQuery
		
	#region ModelCrossSectionFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelCrossSection"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelCrossSectionFilters : ModelCrossSectionFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelCrossSectionFilters class.
		/// </summary>
		public ModelCrossSectionFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelCrossSectionFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelCrossSectionFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelCrossSectionFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelCrossSectionFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelCrossSectionFilters
	
	#region ModelCrossSectionQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelCrossSectionParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelCrossSection"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelCrossSectionQuery : ModelCrossSectionParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelCrossSectionQuery class.
		/// </summary>
		public ModelCrossSectionQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelCrossSectionQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelCrossSectionQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelCrossSectionQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelCrossSectionQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelCrossSectionQuery
		
	#region ModelIcDiscoFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelIcDisco"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelIcDiscoFilters : ModelIcDiscoFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelIcDiscoFilters class.
		/// </summary>
		public ModelIcDiscoFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelIcDiscoFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelIcDiscoFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelIcDiscoFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelIcDiscoFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelIcDiscoFilters
	
	#region ModelIcDiscoQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelIcDiscoParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelIcDisco"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelIcDiscoQuery : ModelIcDiscoParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelIcDiscoQuery class.
		/// </summary>
		public ModelIcDiscoQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelIcDiscoQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelIcDiscoQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelIcDiscoQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelIcDiscoQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelIcDiscoQuery
		
	#region ModelNodeFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelNode"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelNodeFilters : ModelNodeFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelNodeFilters class.
		/// </summary>
		public ModelNodeFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelNodeFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelNodeFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelNodeFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelNodeFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelNodeFilters
	
	#region ModelNodeQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelNodeParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelNode"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelNodeQuery : ModelNodeParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelNodeQuery class.
		/// </summary>
		public ModelNodeQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelNodeQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelNodeQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelNodeQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelNodeQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelNodeQuery
		
	#region ModelPipeShapeFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelPipeShape"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelPipeShapeFilters : ModelPipeShapeFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelPipeShapeFilters class.
		/// </summary>
		public ModelPipeShapeFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelPipeShapeFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelPipeShapeFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelPipeShapeFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelPipeShapeFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelPipeShapeFilters
	
	#region ModelPipeShapeQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelPipeShapeParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelPipeShape"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelPipeShapeQuery : ModelPipeShapeParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelPipeShapeQuery class.
		/// </summary>
		public ModelPipeShapeQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelPipeShapeQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelPipeShapeQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelPipeShapeQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelPipeShapeQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelPipeShapeQuery
		
	#region ModelPumpCurveFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelPumpCurve"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelPumpCurveFilters : ModelPumpCurveFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelPumpCurveFilters class.
		/// </summary>
		public ModelPumpCurveFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelPumpCurveFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelPumpCurveFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelPumpCurveFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelPumpCurveFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelPumpCurveFilters
	
	#region ModelPumpCurveQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelPumpCurveParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelPumpCurve"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelPumpCurveQuery : ModelPumpCurveParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelPumpCurveQuery class.
		/// </summary>
		public ModelPumpCurveQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelPumpCurveQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelPumpCurveQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelPumpCurveQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelPumpCurveQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelPumpCurveQuery
		
	#region ModelSpecialLinkFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelSpecialLink"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelSpecialLinkFilters : ModelSpecialLinkFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelSpecialLinkFilters class.
		/// </summary>
		public ModelSpecialLinkFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelSpecialLinkFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelSpecialLinkFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelSpecialLinkFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelSpecialLinkFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelSpecialLinkFilters
	
	#region ModelSpecialLinkQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelSpecialLinkParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelSpecialLink"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelSpecialLinkQuery : ModelSpecialLinkParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelSpecialLinkQuery class.
		/// </summary>
		public ModelSpecialLinkQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelSpecialLinkQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelSpecialLinkQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelSpecialLinkQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelSpecialLinkQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelSpecialLinkQuery
		
	#region ModelStreetTargetFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelStreetTarget"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelStreetTargetFilters : ModelStreetTargetFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelStreetTargetFilters class.
		/// </summary>
		public ModelStreetTargetFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelStreetTargetFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelStreetTargetFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelStreetTargetFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelStreetTargetFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelStreetTargetFilters
	
	#region ModelStreetTargetQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelStreetTargetParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelStreetTarget"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelStreetTargetQuery : ModelStreetTargetParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelStreetTargetQuery class.
		/// </summary>
		public ModelStreetTargetQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelStreetTargetQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelStreetTargetQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelStreetTargetQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelStreetTargetQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelStreetTargetQuery
		
	#region ModelSpecialLinksDatumFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelSpecialLinksDatum"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelSpecialLinksDatumFilters : ModelSpecialLinksDatumFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelSpecialLinksDatumFilters class.
		/// </summary>
		public ModelSpecialLinksDatumFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelSpecialLinksDatumFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelSpecialLinksDatumFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelSpecialLinksDatumFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelSpecialLinksDatumFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelSpecialLinksDatumFilters
	
	#region ModelSpecialLinksDatumQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelSpecialLinksDatumParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelSpecialLinksDatum"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelSpecialLinksDatumQuery : ModelSpecialLinksDatumParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelSpecialLinksDatumQuery class.
		/// </summary>
		public ModelSpecialLinksDatumQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelSpecialLinksDatumQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelSpecialLinksDatumQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelSpecialLinksDatumQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelSpecialLinksDatumQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelSpecialLinksDatumQuery
		
	#region ModelIcDrywellFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelIcDrywell"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelIcDrywellFilters : ModelIcDrywellFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelIcDrywellFilters class.
		/// </summary>
		public ModelIcDrywellFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelIcDrywellFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelIcDrywellFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelIcDrywellFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelIcDrywellFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelIcDrywellFilters
	
	#region ModelIcDrywellQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelIcDrywellParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelIcDrywell"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelIcDrywellQuery : ModelIcDrywellParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelIcDrywellQuery class.
		/// </summary>
		public ModelIcDrywellQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelIcDrywellQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelIcDrywellQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelIcDrywellQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelIcDrywellQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelIcDrywellQuery
		
	#region ModelPumpFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelPump"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelPumpFilters : ModelPumpFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelPumpFilters class.
		/// </summary>
		public ModelPumpFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelPumpFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelPumpFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelPumpFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelPumpFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelPumpFilters
	
	#region ModelPumpQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelPumpParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelPump"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelPumpQuery : ModelPumpParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelPumpQuery class.
		/// </summary>
		public ModelPumpQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelPumpQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelPumpQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelPumpQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelPumpQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelPumpQuery
		
	#region ModelPipeShapesDatumFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelPipeShapesDatum"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelPipeShapesDatumFilters : ModelPipeShapesDatumFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelPipeShapesDatumFilters class.
		/// </summary>
		public ModelPipeShapesDatumFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelPipeShapesDatumFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelPipeShapesDatumFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelPipeShapesDatumFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelPipeShapesDatumFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelPipeShapesDatumFilters
	
	#region ModelPipeShapesDatumQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelPipeShapesDatumParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelPipeShapesDatum"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelPipeShapesDatumQuery : ModelPipeShapesDatumParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelPipeShapesDatumQuery class.
		/// </summary>
		public ModelPipeShapesDatumQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelPipeShapesDatumQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelPipeShapesDatumQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelPipeShapesDatumQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelPipeShapesDatumQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelPipeShapesDatumQuery
		
	#region ModelRoofTargetFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelRoofTarget"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelRoofTargetFilters : ModelRoofTargetFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelRoofTargetFilters class.
		/// </summary>
		public ModelRoofTargetFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelRoofTargetFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelRoofTargetFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelRoofTargetFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelRoofTargetFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelRoofTargetFilters
	
	#region ModelRoofTargetQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelRoofTargetParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelRoofTarget"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelRoofTargetQuery : ModelRoofTargetParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelRoofTargetQuery class.
		/// </summary>
		public ModelRoofTargetQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelRoofTargetQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelRoofTargetQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelRoofTargetQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelRoofTargetQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelRoofTargetQuery
		
	#region ModelCrossSectionsDatumFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ModelCrossSectionsDatum"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelCrossSectionsDatumFilters : ModelCrossSectionsDatumFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelCrossSectionsDatumFilters class.
		/// </summary>
		public ModelCrossSectionsDatumFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelCrossSectionsDatumFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelCrossSectionsDatumFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelCrossSectionsDatumFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelCrossSectionsDatumFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelCrossSectionsDatumFilters
	
	#region ModelCrossSectionsDatumQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ModelCrossSectionsDatumParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ModelCrossSectionsDatum"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ModelCrossSectionsDatumQuery : ModelCrossSectionsDatumParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ModelCrossSectionsDatumQuery class.
		/// </summary>
		public ModelCrossSectionsDatumQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ModelCrossSectionsDatumQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ModelCrossSectionsDatumQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ModelCrossSectionsDatumQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ModelCrossSectionsDatumQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ModelCrossSectionsDatumQuery
	#endregion

	
}
